package dto

// 创建节点
type CreateNodeGroupReq struct {
	Name     string   `json:"name" comment:"节点名称" validate:"required,name-checker"`
	NodeType string   `json:"nodeType" comment:"节点类型" validate:"required"`
	Describe string   `json:"describe" comment:"描述"`
	NodeIds  []string `json:"nodeIds" comment:"描述" validate:"required"`
}

type CreateNodeGroupRsp struct {
	ID int64 `json:"id"`
}

// 列表
type GetNodeGroupListReq struct {
	PageNum  int64  `form:"pageNum" validate:"required"`
	PageSize int64  `form:"pageSize" validate:"required"`
	Name     string `form:"name"`
	Sort     string `form:"sort"`
}

type GetNodeGroupListRsp struct {
	Items []OutApedgeNodeGroupItem `json:"items"`
	Total int64                    `json:"total"`
}

// node 详情
type GetNodeGroupDetailReq struct {
	ID int64 `uri:"id" validate:"required"`
}

type GetNodeGroupDetailRsp struct {
	OutApedgeNodeGroupItem
}

type OutApedgeNodeGroupItem struct {
	ID          int64                    `json:"id"`
	OrgId       int64                    `json:"orgId"`
	GroupId     int64                    `json:"groupId"`
	UserId      int64                    `json:"userId"`
	UserName    string                   `json:"userName"`
	Name        string                   `json:"name"`
	Describe    string                   `json:"describe"`
	NodeType    string                   `json:"nodeType"`
	Nodes       []OutApedgeNodeItem      `json:"nodes"` //omitempty
	Services    []OutApedgeInferenceItem `json:"services"`
	OnlineRatio string                   `json:"onlineRatio"`
	CreatedAt   int64                    `json:"createdAt"`
	UpdatedAt   int64                    `json:"updatedAt"`
}

// 删除
type DelNodeGroupReq struct {
	ID int64 `uri:"id" validate:"required"`
}

type DelNodeGroupRsp struct{}
